#ifndef __SYSCALLS_H__
#define __SYSCALLS_H__

#include <tipos.h>

#define SYS_INT 0x30

typedef enum {
SYSCALL_EXIT,
SYSCALL_GETPID,
SYSCALL_PALLOC,
SYSCALL_OPEN,
SYSCALL_READ,
SYSCALL_WRITE,
SYSCALL_FLUSH,
//SYSCALL_TEST_SERIAL,
//SYSCALL_TEST_CON,
SYSCALL_RUN,
SYSCALL_TEST_HDD,
SYSCALL_FORK,
SYSCALL_PIPE,
SYSCALL_SHARE_PAGE,
SYSCALL_SEEK,
SYSCALL_MAX = 32
} syscall_enum; 


#ifdef __KERNEL__

// Sólo se compila en modo "kernel"

typedef uint_32(*syscall_prototype)(uint_32 *, void *);

#else
// __TAREA___

// Sólo se compila en modo "tarea"

// Declarar los "wrapers" para los syscalls que incluyen las tareas.

pid getpid();
pid fork();
pid run(char * file, int priv_level);
void* palloc();
int pipe(int pipes[2]);
void exit();
void* open_serial0();
int test_hdd(int disk, void *buf);
int share_page(void * page_addr);


#endif /* __KERNEL__ */

#endif /* __SYSCALLS_H__ */
